package com.oo.abstractAndInterface_6.shape;

/**
 * Triangle--${description}
 *
 * @author: Jovi
 * @createTime: 2017-04-18 16:32
 **/
public class Triangle extends Shape {

    private  int side1,side2;

    public int getSide1() {
        return side1;
    }

    public void setSide1(int side1) {
        this.side1 = side1;
    }

    public int getSide2() {
        return side2;
    }

    public void setSide2(int side2) {
        this.side2 = side2;
    }

    @Override
    public int perimeter() {
        return this.getBottom()+this.getSide1()+this.getSide2();
    }

    @Override
    public int area() {
        return this.getBottom()*this.getHigh()/2;
    }
}
